home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{FFACF7F3-B868-11CE-84A8-08005A9B23BD}#1.7#0"; "DSSOCK32.OCX"
- Begin VB.Form Form2
- BorderStyle = 3 'Fixed Dialog
- Caption = "Finger Example"
- ClientHeight = 3555
- ClientLeft = 1140
- ClientTop = 1515
- ClientWidth = 6165
- LinkTopic = "Form2"
- MaxButton = 0 'False
- MinButton = 0 'False
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 3555
- ScaleWidth = 6165
- ShowInTaskbar = 0 'False
- Begin VB.TextBox theUser
- Height = 285
- Left = 1680
- TabIndex = 5
- Top = 3720
- Width = 855
- End
- Begin VB.CommandButton Command1
- Caption = "finger"
- Height = 255
- Left = 4680
- TabIndex = 3
- Top = 0
- Width = 975
- End
- Begin VB.ListBox lResponse
- Height = 3015
- Left = 0
- TabIndex = 1
- Top = 360
- Width = 6135
- End
- Begin VB.TextBox tHost
- Height = 285
- Left = 1320
- TabIndex = 0
- Top = 0
- Width = 2775
- End
- Begin dsSocketLib.dsSocket dsSocket1
- Height = 420
- Left = 5760
- TabIndex = 4
- Top = 0
- Width = 420
- _Version = 65543
- _ExtentX = 741
- _ExtentY = 741
- _StockProps = 64
- LocalPort = 0
- RemoteHost = ""
- RemotePort = 79
- ServiceName = ""
- RemoteDotAddr = ""
- Linger = -1 'True
- Timeout = 10
- LineMode = 0 'False
- EOLChar = 10
- BindConnect = 0 'False
- SocketType = 0
- End
- Begin VB.Label Label1
- BackStyle = 0 'Transparent
- Caption = "host to finger:"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 0
- TabIndex = 2
- Top = 0
- Width = 1335
- End
- Attribute VB_Name = "Form2"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub Command1_Click()
- On Error Resume Next
- ' check to see if the user is lookin up a email
- ' address or a domain.
- x% = InStr(tHost, "@")
- If x% <> 0 Then
- rUser$ = Left$(tHost, x% - 1)
- rHost$ = Mid$(tHost, x% + 1)
- rUser$ = ""
- rHost$ = tHost
- End If
- ' sets the thing to finger to a textbox so we can
- ' send the data to the server after we're connected
- theUser = rHost$
- ' start the connection.
- lResponse.Clear
- dsSocket1.RemoteHost = rHost$
- lResponse.AddItem " connecting to " & rHost$
- dsSocket1.RemotePort = 79
- dsSocket1.Connect
- End Sub
- Private Sub dsSocket1_Connect()
- ' after connecting, clear the info from a previous
- ' finger.
- lResponse.Clear
- dsSocket1.Send = theUser & Chr$(10)
- End Sub
- Private Sub dsSocket1_Exception(ErrorCode As Integer, ErrorDesc As String)
- lResponse.AddItem ErrorDesc
- End Sub
- Private Sub dsSocket1_Receive(ReceiveData As String)
- ' add the data to the listbox.
- lResponse.AddItem ReceiveData
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- On Error Resume Next
- dsSocket1.Close
- End Sub
-